<?php

namespace app\admin\validate;

use think\Validate;
use app\common\Error;

class Partners extends Validate
{
    protected $rule = [
        'id' => 'require',
        'name' => 'require',
        'abbreviation' => 'require',
        'start_time' => 'require',
        'end_time' => 'require',
        'type' => 'require',
    ];

    protected $message = [
        'id.require' => Error::ID_NOT_EXIXTS,
        'name.require' => Error::NAME_NOT_EXIXTS,
        'abbreviation.require' => Error::ABBREVIATION_NOT_EXIXTS,
        'start_time.require' => Error::START_TIME_NOT_EXIXTS,
        'end_time.require' => Error::END_TIME_NOT_EXIXTS,
        'type.require' => Error::TYPE_NOT_EXIXTS,
    ];

    protected $scene = [
        'add' => ['name', 'abbreviation', 'start_time', 'end_time', 'type'],
        'edit' => ['id', 'name', 'abbreviation', 'start_time', 'end_time', 'type'],
        'delete' => ['id'],
        'detail' => ['id'],
        'show' => ['id'],
    ];
}